package com.hoshiicloud.user.service.usercenter;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.exception.ServiceException;
import com.hoshiicloud.user.dto.userCenter.MemberDto;
import com.hoshiicloud.user.entity.usercenter.PlatConsumer;
import com.hoshiicloud.user.param.PlatStoreConsumerPageParam;


import java.util.List;

/**
 * 平台消费者信息Service接口
 *
 * @author : yangcheng
 * @date : 2019/5/9 14:44
 * @mail : maiboyc@163.com
 **/
public interface IPlatConsumerService extends IService<PlatConsumer> {

    /**
     * 根据id获取
     * @param id ID
     * @return PlatConsumer
     */
    PlatConsumer getById(Long id);

    /**
     * 根据一组id
     * @param ids id组
     * @return List<PlatConsumer>
     */
    List<PlatConsumer> getByIds(List<Long> ids);

    /**
     * 保存
     * @param entity 实体对象
     * @return boolean
     */
    Long insert(PlatConsumer entity) throws ServiceException;

    /**
     * 修改
     * @param entity 实体对象
     * @return boolean
     */
    Long update(PlatConsumer entity) throws ServiceException;

    /**
     * 查询
     * @param entity 查询参数实体
     * @return IPage<PlatConsumer>
     */
    IPage<PlatConsumer> List(PlatConsumer entity);

    /**
     * 根据参数查询平台消费者信息
     * @param entity 查询参数
     * @return List<PlatConsumer>
     */
    List<PlatConsumer> getConsumers(PlatConsumer entity);

    /**
     * 删除
     * @param id ID
     * @return boolean
     */
    boolean delete(Long id) throws ServiceException;

    /*
     * @param param
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.hoshiicloud.user.dto.userCenter.MemberDto>
     * @author: Mr.wu
     * @descripton: 分页查询店铺消费者
     * @date: 10:42 2019/8/13
     */
    Page<MemberDto> getStoreConsumerPage(PlatStoreConsumerPageParam param);

}
